package com.project.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.entity.po.RechargeRecord;

import java.util.Date;
import java.util.List;

/**
 * @ProjectName:
 * @Package:
 * @ClassName:
 * @Author: ZhaoLongShi
 * @CreateDate:
 */
public interface RechargeRecordMapper extends BaseMapper<RechargeRecord> {
    /**
     *  根据用户ID查询充值记录
     * @param userId
     * @return
     */
    default List<RechargeRecord> selectRecordByUserId(Long userId){
        QueryWrapper<RechargeRecord> qw = new QueryWrapper<>();
        qw.lambda().eq(RechargeRecord::getUserId,userId);
        return this.selectList(qw);
    }

}